projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d8811c
)
env_nand: fix env memory release
author
[email protected]
<
[email protected]
>
Mon, 26 Jan 2009 21:08:17 +0000
(14:08 -0700)
committer
Scott Wood
<
[email protected]
>
Fri, 6 Feb 2009 22:06:53 +0000
(16:06 -0600)
This fixes a bug that tmp environment memory not being released.
Signed-off-by: Derek Ou <
[email protected]
>
Signed-off-by: Scott Wood <
[email protected]
>
common/env_nand.c
patch
|
blob
|
history
diff --git
a/common/env_nand.c
b/common/env_nand.c
index 8af9e74aac5717317277329deec4766d361c06fb..e490775ecf5af3fe49ac83780c5b83f8169a9c46 100644
(file)
--- a/
common/env_nand.c
+++ b/
common/env_nand.c
@@
-304,9
+304,11
@@
void env_relocate_spec (void)
crc1_ok = (crc32(0, tmp_env1->data, ENV_SIZE) == tmp_env1->crc);
crc2_ok = (crc32(0, tmp_env2->data, ENV_SIZE) == tmp_env2->crc);
- if(!crc1_ok && !crc2_ok)
+ if(!crc1_ok && !crc2_ok) {
+ free(tmp_env1);
+ free(tmp_env2);
return use_default();
- else if(crc1_ok && !crc2_ok)
+
}
else if(crc1_ok && !crc2_ok)
gd->env_valid = 1;
else if(!crc1_ok && crc2_ok)
gd->env_valid = 2;